﻿<admintpl file="header" />
</head>
<body class="J_scroll_fixed">
		<div class="wrap jj">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('Gm/give')}">游戏币发放</a></li>
		</ul>
		
		<div class="common-form">
			<form method="post" class="form-horizontal" action="{:U('Gm/give_verify')}">
				<fieldset>
					<div class="control-group">
					<label class="control-label">游戏 (游戏币名称):</label>
						<div class="controls">
						<input type="hidden" class="input" name="app_id" id="app_id" value="{$app_id}">
							<label class="control-label" style="text-align:left">{$games[$app_id]} ({$gamemoneys[$app_id]})</label>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">玩家账号:</label>
						<div class="controls">
							<input type="hidden" class="input" name="username" id="username" value="{$username}">
							
							<label class="control-label" style="text-align:left">{$username}</label>
						</div>
					</div>
					
					<div class="control-group">
						<label class="control-label">拥有数量:</label>
						<div class="controls">
							<label class="control-label" style="text-align:left">{$remain}</label>
						</div>
					</div>
					
					
					<div class="control-group">
						<label class="control-label">请填写充值游戏币数量:</label>
						<div class="controls">
							<input type="text" class="input" name="newgm" value="" autocomplete="off">
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">请填写充值金额:</label>
						<div class="controls">
							<input type="text" class="input" name="amount" value="" autocomplete="off">
						</div>
					</div>
					<div class="control-group">
						<label class="control-label">请填写备注:</label>
						<div class="controls">
							<input type="text" class="input" name="beizhu" value="" autocomplete="off">
						</div>
					</div>
				</fieldset>
				<div class="form-actions">
					<input name="adminsite" type="hidden"  id="adminsite" value="{:U('Gm/ajaxGetgm')}">
					<button type="submit"	class="btn btn-primary btn_submit">确认</button>
				</div>
			</form>
		</div>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script>
		$(function(){
			$("#username").bind("blur",function(){
				var app_id = $("#app_id").val();
				
				var adminsite = $("#adminsite").val() + "?&app_id="+app_id;
				$.ajax({
					url: adminsite,
					type: "GET",
					success: function(data) {
						if (data == "noexit") {
							$("#usernamespan").show();	
						} else {
							$("#usernamespan").hide();
							$("#oldgm").val(data);
						}
					} 	
				});		
			});
		});
	</script>	
</body>
</html>